package com.activity.adapter;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.activity.bean.AttanceRecordBean;
import com.example.apple.ddhr_new.R;
import com.example.apple.ddhr_new.adapter.BaseAdapter;

public class SheetDetailAdapter extends BaseAdapter <AttanceRecordBean> {

    public SheetDetailAdapter(Context context) {
        super(context);
    }




    @Override
    public boolean hasHeader(int groupPosition) {
        return false;
    }

    @Override
    public int getHeaderLayout(int viewType) {
       return R.layout.header_sheet_detail;
    }

    @Override
    public BaseViewHolder<AttanceRecordBean> getViewHolder(int viewType, View view) {
        return null;
    }

    @Override
    public int getChildLayout(int viewType) {
        return R.layout.item_month_cell;
    }

    @Override
    public void onBindChildViewHolder(com.donkingliang.groupedadapter.holder.BaseViewHolder holder, int groupPosition, int childPosition) {


        AttanceRecordBean data = getData().get(childPosition);

      TextView tvContent =  holder.itemView.findViewById(R.id.tv_content);
        TextView tvStatus =  holder.itemView.findViewById(R.id.tv_status);


        tvContent.setText(data.getUserinfo().get(0).getUsernickname()+"   "+data.getCheckinattendacetimespan_begintime()+"-"+data.getCheckinattendacetimespan_endtime()+"   "+data.getHours());
        tvStatus.setText(data.getCheckinstatusString());


    }

    @Override
    public void onBindHeaderViewHolder(com.donkingliang.groupedadapter.holder.BaseViewHolder holder, int groupPosition) {

    }




}
